package day3;
import day2.pet.ChinaDog;
import day2.pet.Dog;
import day2.pet.Pet;

import java.util.*;
/**
 * @author oldliu
 * @since 1.0
 */
public class Fanxing {
    public static void main(String[] args) {
        Set<Pet> s3=new HashSet<>();
        s3.add(new Dog("小花花","母",66,66));
        Iterator<Pet> iterator = s3.iterator();
        Set<? super Dog> s4=new HashSet<>();
        s4.add(new Dog("小花花","母",66,66));
        s4.add(new ChinaDog("Dahua","gong",44,46));
        //s4.add("sss");

        //Set<Object> set=new HashSet<>();
        List<String> list=new ArrayList<>();
        Map<String,Dog> map=new HashMap<>();
        map.put("小高",new Dog("大黄","公",76,88));
        map.put("xiaowang",new Dog("贾斯汀","公",76,88));
        map.put("老李",new Dog("大黄","母",99,99));
        Iterator<Map.Entry<String, Dog>> it = map.entrySet().iterator();
        while(it.hasNext()){
            Map.Entry<String, Dog> next = it.next();
            System.out.println(next.getKey()+","+next.getValue());
        }
//        list.add(44);
//        list.add(4.6);
//        list.add(new Dog("bibo","gong",44,55));
        list.add("dog");
        list.add("cat");
        //list.add(5.7);
        String s = list.get(0);
        System.out.println(s);
        for(String str:list)
            System.out.println(str);
    }
}
